import sourcecode.*;
import bug.BugCorpusCreatorMy;
import commitlog.VisionScore;
import property.*;


public class Core {

	public void process() {

        // ------------bug-------------------------
		try {
			System.out.println("create bug corpus start.");
			new BugCorpusCreatorMy().create();//BugCorpus.txt,SortedId.txt,FixLink.txt,DescriptionClassName.txt,bugreport count
			System.out.println("create bug corpus finished.");	
		} catch (Exception ex) {
			System.out.println("some error happenend.");
		}

		try {
            System.out.println("create code corpus origin start.");
            new CodeCorpusCreatorMy().create();
            System.out.println("create code corpus origin finished.");
        } catch (Exception ex) {
        	System.out.println("some error happenend.");
        }
		if(Property.getInstance().getFlag()){
			try {
				new VisionScore().create(Property.getInstance().getProject());
			} catch (Exception e) {
				// TODO Auto-generated catch block
				System.out.println("some error happenend.");
				e.printStackTrace();
			}
		}
		System.out.println("finished");
	}
}
